Gets the year of the datetime represented by this instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DateTime), | intent(in) | :: | time |
FUNCTION GetYear & ! (time) & ! RESULT (year) IMPLICIT NONE ! Arguments with intent(in): TYPE (DateTime), INTENT(IN) :: time ! Local variables: INTEGER (KIND = short) :: year !------------end of declaration------------------------------------------------ year = time % year END FUNCTION GetYear